<?php
require_once dirname(__FILE__).'/../../rightMenuWidget/lib/RightMenuHelper.class.php';

class redirectMeDownComponents extends myComponents{

	public function executeRender(){

		$helper = new RightMenuHelper();

		$items = $helper->getItemChildren($this->getAction()->getRoute()->getObject(), array());


		if(isset($items[0]) && isset($items[0]['node'])){
			$this->getAction()->redirect(
				$this->getAction()->getComponent('linker','articleLinkBuilder', array('node' => $items[0]['node']))
			);
		}
		
		
		return sfView::NONE;
	}
	
}